package com.kevin.v2.spring.formework.webmvc.servlet;

import lombok.Data;

import java.lang.reflect.Method;
import java.util.regex.Pattern;

/**
 * 路由映射
 */
@Data
public class KvHandlerMapping {
   //一个url 正则
   private Pattern regx;
   //url 对应的方法
   private Method method;
   //url 对应的controller
   private Object controller;

   public KvHandlerMapping (Pattern regx, Method method, Object controller) {
      this.regx = regx;
      this.method = method;
      this.controller = controller;
   }

   @Override
   public String toString () {
      return "KvHandlerMapping{" + "regx=" + regx + ", method=" + method + ", controller=" + controller + '}';
   }
}
